<template>
    <div class="container">
        <el-row>
            <!-- <el-form
        :inline="true"
        ref="form"
        :rules="rules"
        :model="form"
        label-width="200px"
        label-position="right"
      >
        <el-form-item label="姓名：" prop="name">
          <el-input v-model="form.name" placeholder="请输入姓名"></el-input>
        </el-form-item>
        <el-form-item prop="phone" label="联系方式：">
          <el-input
            v-model="form.phone"
            placeholder="请输入联系方式"
          ></el-input>
        </el-form-item>
        <el-form-item label="微信号：" prop="wechat">
          <el-input v-model="form.wechat" placeholder="请输入微信号"></el-input>
        </el-form-item>
        <el-form-item class="radio-form" label="性别：" prop="sex">
          <el-radio-group v-model="form.sex">
            <el-radio :label="1">男</el-radio>
            <el-radio :label="0">女</el-radio>
          </el-radio-group>
        </el-form-item>
        <el-form-item label="年龄：" prop="age">
          <el-input
            type="age"
            v-model.number="form.age"
            placeholder="请输入年龄"
          ></el-input>
        </el-form-item>

        <el-form-item label="客户来源：" prop="source">
          <el-input
            v-model="form.source"
            placeholder="请输入客户来源"
          ></el-input>
        </el-form-item>
        <el-form-item label="获客途径：" prop="channel">
          <el-input
            v-model="form.channel"
            placeholder="请输入获客途径"
          ></el-input>
        </el-form-item>
        <el-form-item label="投资经历：" prop="investExperience">
          <el-input
            v-model="form.investExperience"
            placeholder="请输入投资经历"
          ></el-input>
        </el-form-item>
        <el-form-item label="企业微信：" prop="companyWechat">
          <el-input
            v-model="form.companyWechat"
            placeholder="请输入企业微信"
          ></el-input>
        </el-form-item>
        <el-form-item label="投资金额：" prop="invetMoney">
          <el-input
            v-model.number="form.invetMoney"
            placeholder="请输入投资金额"
          ></el-input>
        </el-form-item>
        <el-form-item label="生日：" prop="birthday">
          <el-date-picker
            value-format="yyyy-MM-dd"
            v-model="form.birthday"
            type="date"
            placeholder="选择日期"
          >
          </el-date-picker>
        </el-form-item>
        <el-form-item label="家庭情况：" prop="family">
          <el-input
            v-model="form.family"
            placeholder="请输入家庭情况"
          ></el-input>
        </el-form-item>
        <el-form-item label="学历背景：" prop="education">
          <el-input
            v-model="form.education"
            placeholder="请输入学历背景"
          ></el-input>
        </el-form-item>
        <el-form-item label="兴趣爱好：" prop="hobby">
          <el-input
            v-model="form.hobby"
            placeholder="请输入兴趣爱好"
          ></el-input>
        </el-form-item>
        <el-form-item label="性格特点：" prop="temper">
          <el-input
            v-model="form.temper"
            placeholder="请输入性格特点"
          ></el-input>
        </el-form-item>
        <el-form-item label="工作情况：" prop="work">
          <el-input v-model="form.work" placeholder="请输入工作情况"></el-input>
        </el-form-item>
        <el-form-item label="决策人：" prop="decider">
          <el-input
            v-model="form.decider"
            placeholder="请输入决策人"
          ></el-input>
        </el-form-item>
        <el-form-item class="radio-form" label="客户类型：" prop="customerType">
          <el-radio-group v-model="form.customerType">
            <el-radio label="A">{{ CUSTOMERTYPE["A"] }}</el-radio>
            <el-radio label="B">{{ CUSTOMERTYPE["B"] }}</el-radio>
            <el-radio label="C">{{ CUSTOMERTYPE["C"] }}</el-radio>
          </el-radio-group>
        </el-form-item>
        <el-form-item label="客户见面次数：" prop="seeCount">
          <el-input
            v-model.number="form.seeCount"
            placeholder="请输入客户见面次数"
          ></el-input>
        </el-form-item>
        <el-form-item label="客户见面时间：" prop="seeTime">
          <el-date-picker
            value-format="yyyy-MM-dd"
            v-model="form.seeTime"
            type="date"
            placeholder="选择日期"
          >
          </el-date-picker>
        </el-form-item>
        <el-form-item label="最近一次与客户见面时间：" prop="seeLastTime">
          <el-date-picker
            value-format="yyyy-MM-dd"
            v-model="form.seeLastTime"
            type="date"
            placeholder="选择日期"
          >
          </el-date-picker>
        </el-form-item>
        <el-form-item label="公司认可度：" prop="companyRecognise">
          <el-input
            v-model="form.companyRecognise"
            placeholder="请输入公司认可度"
          ></el-input>
        </el-form-item>
        <el-form-item label="产品类别需求：" prop="productTypeNeeds">
          <el-input
            v-model="form.productTypeNeeds"
            placeholder="请输入产品类别需求"
          ></el-input>
        </el-form-item>
        <el-form-item label="资金池：" prop="rewardPool">
          <el-input
            v-model="form.rewardPool"
            placeholder="请输入资金池"
          ></el-input>
        </el-form-item>
        <el-form-item label="到账时间：" prop="biilInTime">
          <el-date-picker
            value-format="yyyy-MM-dd"
            v-model="form.biilInTime"
            type="date"
            placeholder="选择日期"
          >
          </el-date-picker>
        </el-form-item>
        <el-form-item label="对接产品：" prop="productName">
          <el-input
            v-model="form.productName"
            placeholder="请输入对接产品"
          ></el-input>
        </el-form-item>
        <el-form-item label="客户异议：" prop="customerViews">
          <el-input
            v-model="form.customerViews"
            placeholder="请输入客户异议"
          ></el-input>
        </el-form-item>
        <el-form-item label="下一步方案：" prop="nextScheme">
          <el-input
            v-model="form.nextScheme"
            placeholder="请输入下一步方案"
          ></el-input>
        </el-form-item>
        <el-form-item label="身份证：" prop="idcard">
          <el-input v-model="form.idcard" placeholder="请输入身份证"></el-input>
        </el-form-item>
        <el-form-item label="账户：" prop="bankAccount">
          <el-input
            v-model="form.bankAccount"
            placeholder="请输入账户"
          ></el-input>
        </el-form-item>
        <el-form-item label="开户行：" prop="bankName">
          <el-input
            v-model="form.bankName"
            placeholder="请输入开户行"
          ></el-input>
        </el-form-item>
        <el-form-item label="住址：" prop="address">
          <el-input v-model="form.address" placeholder="请输入住址"></el-input>
        </el-form-item>
        <el-form-item label="认购项目：" prop="buyProject">
          <el-input
            v-model="form.buyProject"
            placeholder="请输入认购项目"
          ></el-input>
        </el-form-item>
        <el-form-item label="成交时间：" prop="dealTime">
          <el-date-picker
            value-format="yyyy-MM-dd"
            v-model="form.dealTime"
            type="date"
            placeholder="选择日期"
          >
          </el-date-picker>
        </el-form-item>
        <el-form-item label="认购金额：" prop="buyMoney">
          <el-input
            type="number"
            v-model.number="form.buyMoney"
            placeholder="请输入认购金额"
          ></el-input>
        </el-form-item>
        <el-form-item label="到期时间：" prop="expireTime">
          <el-date-picker
            value-format="yyyy-MM-dd"
            v-model="form.expireTime"
            type="date"
            placeholder="选择日期"
          >
          </el-date-picker>
        </el-form-item>
        <el-form-item label="转化率(%)：" prop="convertRate">
          <el-input
            v-model="form.convertRate"
            placeholder="请输入转化率(%)"
          ></el-input>
        </el-form-item>
        <el-form-item label="转化周期：" prop="convertCycle">
          <el-input
            v-model="form.convertCycle"
            placeholder="请输入转化周期"
          ></el-input>
        </el-form-item>
        <el-form-item label="备注：" prop="remark">
          <el-input v-model="form.remark" placeholder="请输入备注"></el-input>
        </el-form-item>
        <el-row>
          <el-col :push="2">
            <el-form-item>
              <el-button
                type="primary"
                @click="onSubmit('form')"
                :loading="loading"
                >保存</el-button
              >
            </el-form-item>
          </el-col>
        </el-row>
      </el-form> -->
            <add-form :info="detail" />
        </el-row>
    </div>
</template>

<script>
    import normalFilter from "@/components/NormalFilter";
    import { getDetail } from "@/api/customer";
    import addForm from "./components/addForm";

    export default {
        name: "CustomerAdd",
        components: {
            normalFilter,
            addForm,
        },
        data() {
            return {
                detail: {},
            };
        },
        async mounted() {
            let { id } = this.$route.params;
            if (!id) return;
            this.id = id;
            //获取详情
            let detail = await getDetail({ id });
            if (detail) {
                this.detail = detail;
            }
        },
        methods: {},
    };
</script>

<style lang="scss" scoped>
    .container {
        width: 100%;
        height: 100%;
        padding: 20px;
        // .radio-user {
        //   ::v-deep .el-form-item__error {
        //     left: 5%;
        //   }
        // }
    }
</style>
